package org.ru.mse10.cvis.entity.cv.custom;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.ru.mse10.cvis.entity.misc.Identity;

/**
 * The Class CustomFieldValue.
 */
@Entity
@Table(name = "custom_field_value")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "TYPE")
public class CustomFieldValue extends Identity {

	/** The value. */
	private String value;

	/** The field. */
	private CustomField field;

	/**
	 * Gets the value.
	 * 
	 * @return the value
	 */
	public String getValue() {
		return value;
	}

	/**
	 * Sets the value.
	 * 
	 * @param value
	 *            the new value
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/**
	 * Gets the field.
	 * 
	 * @return the field
	 */
	@ManyToOne
	public CustomField getField() {
		return field;
	}

	/**
	 * Sets the field.
	 * 
	 * @param field
	 *            the new field
	 */
	public void setField(CustomField field) {
		this.field = field;
	}
}
